<template>
  <view class="main">
    <view class="title">
        {{title}}
    </view>
    <view class="mian_image">
        <el-image :src="image" class="img"> </el-image>
    </view>
    <view class="content">
      <p v-html="content">
      </p>
    </view>
  </view>

</template>
<script>
export default {
  data(){
    return {
      title:"",
      content:"",
      image:"",
      id:0,
    }
  },
  methods:{
    getCompanyFrofile(){
      this.$get("/api/article/detail",{id:this.id}).then(res=>{
        if(res.code == 10000){
          this.content = res.result.content
          this.title = res.result.title
          this.image = res.result.thumbnail
        }
      }).catch(err=>{

      })
    }
  },
  created() {
    this.id =  this.getParams("id");
    console.log(this.id)
    if(this.id != null){
      console.log("ok")
      this.getCompanyFrofile();
    }

  }
}
</script>

<style >
.title{
  float: left;
  width: 100%;
  margin-top: 30px;
  text-align: center;
  font-size: 40px;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  font-weight: bold;
}
.main{
  float: left;
  width: 100%;
}
.mian_image{
  float: left;
  margin-left: 25px;
  margin-right: 25px;
  width: 700px;
  margin-top: 30px;
}
.mian_image .img{
  float: left;
  width: 100%;
}
.content{
  float: left;
  margin-left: 25px;
  margin-right: 25px;
  width: 700px;
  margin-top: 30px;
  margin-bottom: 60px;
  font-size: 32px;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  text-indent: 52px;
}
.content  img{
  float: left;
  width: 100%;
}
</style>